package com.scalar.chiptrack.sales;

import java.io.Serializable;

import java.util.Iterator;
import java.util.ArrayList;
import java.util.HashMap;

import com.scalar.chiptrack.utils.StringUtils;
import com.scalar.chiptrack.sales.dao.SalesOrderDAO;


public class LineItem implements Serializable
{

    public static final String REMARK_NOT_ENOUGH_QTY_WAFERS_TO_BE_STARTED = "There is not enough quantity, Wafers has to be started to meet requested Quantity.";
    public static final String REMARK_NOT_ENOUGH_QTY_TO_MEET_GIVE_DATE = "There is not enough quantity to meet date: ";
    public static final String REMARK_WAFERS_CAN_BE_STARTED = "Wafers can be started to meet date: ";
    public static final String REMARK_GOT_REQUIRED_QUANTITY = "Found quantity to meet the date: ";

    private int lineItemId          = -1;
    private int salesOrderId        = -1;
    private int productId           = -1;
    private int m_InventorySize     = 0;
    private int splitQty            = 0;
    private int newLineItemNumber   = 0;
    private int customerId          = 0;
    private int odmId               = 0;
    private int shipmentNo          = 0;
    private int quotedQuantity;
    private int changeNumber;
    private int lineItemNo;
    private int poLineItemNo;
    private int quantity;
    private int previousQuantity;
    private int quotationLineItemId     = -1;
    private int salesOrderLineItemId    = -1;
    private int splitFromLineItemId     = -1;
    private int qtyAfterSplit;

    private float unitPrice         = 0.0f;
    private float amount            = 0.0f;

    private double unitPriceAsDouble= 0.0;
    private double amountAsDouble   = 0.0;
    double extendedPriceAsDouble    = 0.0;

    private double discountPrice    = 0.0d;
    private double discountAmount   = 0.0d;
    private int    adjustmentQty    = 0;

    private String endUser              = null;
    private String category             = null;
    private String startMacAddress      = null;
    private String endMacAddress        = null;
    private String errorMessage         = null;
    private String labelNumber          = null;
    private String quotedDate           = null;
    private String odmPartNo            = null;
    private String crc                  = null;
    private String progAlgorithm        = null;
    private String lastUpdateDate       = null;
    private String orderType            = null;
    private String displayUnitPrice     = null;
    private String marketingPartNo      = null;
    private String manufacturingPartNo  = null;
    private String lineItemDescription  = null;
    private String requestDate          = null;
    private String bookingDate          = null;
    private String suggScheduleDateWithSubstitutables = null;
    private String suggScheduleDateWithoutSubstitutables = null;
    private String scheduleDate         = null;
    private String revisedDate          = null;
    private String shippedDate          = null;
    private String status               = null;
    private String issueStatus          = null;
    private String oldStatus            = null;
    private String finalStatus          = null;
    private String reason               = null;
    private String addedById            = null;
    private String addedByName          = null;
    private String customerPO           = null;
    private String customerName         = null;
    private String suggScheduleDate     = null;
    private String salesOrderNo         = null;
    private String m_scheduleNumber     = null;
    private String uom	                = null;
    private String eccn	                = null;
    private String licenseException     = null;
    private String m_customerPartNumber = null;
    private String customerPartNo       = null;
    private String mktgHold             = null;
    private String financeHold          = null;
    private String salesHold            = null;
    private String operationsHold       = null;
    private String description          = null;
    private String quotationLineItemNo  = null;
    private String salesOrderLineItemNo = null;
    private String leadTime             = null;

    private boolean isCancel        = false;
    private boolean cancelStatus    = false;
    private boolean isHold          = false;
    private boolean isEditable      = false;
    private boolean isTaxable       = false;
    private boolean zeroPrice       = false;
    private boolean isTransfer      = false;
    private boolean isClose         = false;
    private boolean type            = false;
    private boolean isSplit         = false;
    private boolean isApproved      = false;
    private boolean isExpedite      = false;
    private boolean isNewLineItem   = false;
    private boolean isGenerated     = false;
    private boolean lineItemDetailsModified     = false;
    private boolean lineItemIntialCancellation  = false;
    private boolean lineItemSplited             = false;

    private HashMap m_reservedLotQtyByWeekMap = null;

    private ArrayList m_lotReservationList  = null;
    private ArrayList m_remarks             = new ArrayList();
    private ArrayList leadTimeList          = new ArrayList();

    private String scheduleDescription = null; // HTS Description
    private int processStep_Id  = -1;
    private String fabCountryOfOrigin = null;
    private String assyCountryOfOrigin = null;
    private boolean isCreditNote = false;
    private double reqPrice;
    private double custResalePrice;
    private double suggResalePrice;
    private String newCustomerPartNo;
    private String shippingTerms; //SO Shipping terms to display in sales hold/release screen
    private String shipFromVendor;
    private int portingStatusCode;
    private int minOrderQty;
    private double customPriceField1;
    private String customTextField1;
    private String endCustomer;

    public LineItem() { }

    public LineItem( int lineItemNo, String marketingPartNo, String manufacturingPartNo, String requestDate, int quantity, float unitPrice, float amount )
    {
        this.lineItemNo = lineItemNo;
        this.marketingPartNo = marketingPartNo;
        this.manufacturingPartNo = manufacturingPartNo;
        this.requestDate = requestDate;
        this.quantity = quantity;
        this.unitPrice = unitPrice;
        this.amount = amount;
    }

    public LineItem( int lineItemNo, String marketingPartNo, String manufacturingPartNo, String lineItemDescription, String requestDate, int quantity, float unitPrice, float amount )
    {
        this.lineItemNo = lineItemNo;
        this.marketingPartNo = marketingPartNo;
        this.manufacturingPartNo = manufacturingPartNo;
        this.lineItemDescription = lineItemDescription;
        this.requestDate = requestDate;
        this.quantity = quantity;
        this.unitPrice = unitPrice;
        this.amount = amount;
    }

    public LineItem( String salesOrderNo, int lineItemNo, int quantity, String scheduleDate, String customerName )
    {
        this.salesOrderNo = salesOrderNo;
        this.lineItemNo = lineItemNo;
        this.quantity = quantity;
        this.scheduleDate = scheduleDate;
        this.customerName = customerName;
    }

    public LineItem( String mktPartNumber, int salesOrderId, int lineItemNo,
                     int requestedQty, float unitPrice, float amount,
                     String requestDate, String bookingDate, String scheduleDate,
                     String revisedDate, String status )
    {

        this.marketingPartNo = mktPartNumber;
        this.salesOrderId = salesOrderId;
        this.lineItemNo = lineItemNo;
        this.quantity = requestedQty;
        this.unitPrice = unitPrice;
        this.amount = amount;
        this.requestDate = requestDate;
        this.bookingDate = bookingDate;
        this.scheduleDate = scheduleDate;
        this.revisedDate = revisedDate;
        this.status = status;

    }

    public int getLineItemId()
    {
        return lineItemId;
    }

    public void setLineItemId( int lineItemId )
    {
        this.lineItemId = lineItemId;
    }

    public int getProductId()
    {
        return productId;
    }

    public void setProductId( int productId )
    {
        this.productId = productId;
    }

    public int getQuantity()
    {
        return quantity;
    }

    public void setQuantity( int quantity )
    {
        this.quantity = quantity;
    }

    public String getMinOrderQtyAsString(){
        return StringUtils.formatUnits( minOrderQty );
    }

    public String getQtyAsString()
    {
        return StringUtils.formatUnits( quantity );
    }

    public String getQuotedQtyAsString()
    {
        return StringUtils.formatUnits( quotedQuantity );
    }

    public String getAmountAsString()
    {
        return StringUtils.formatAmountWithNoOfDecimals( amountAsDouble );
    }

    public String getUnitPriceAsString()
    {
        return StringUtils.formatAmountWithNoOfDecimals( unitPriceAsDouble );
    }

    public float getAmount()
    {
        return amount;
    }

    public void setAmount( float amount )
    {
        this.amount = amount;
    }

    public String getManufacturingPartNo()
    {
        return manufacturingPartNo;
    }

    public void setManufacturingPartNo( String manufacturingPartNo )
    {
        this.manufacturingPartNo = manufacturingPartNo;
    }

    public String getLineItemDescription()
    {
        if( lineItemDescription == null )
        {
            lineItemDescription = "";
        }
        return lineItemDescription;
    }

    public void setLineItemDescription( String lineItemDescription )
    {
        this.lineItemDescription = lineItemDescription;
    }

    public String getMarketingPartNo()
    {
        return marketingPartNo;
    }

    public void setMarketingPartNo( String marketingPartNo )
    {
        this.marketingPartNo = marketingPartNo;
    }

    public String getStatus()
    {
        return status;
    }

    public void setStatus( String status )
    {
        this.status = status;
    }

    public String getIssueStatus()
    {
        return issueStatus;
    }

    public void setIssueStatus( String issueStatus )
    {
        this.issueStatus = issueStatus;
    }

    public String getOldStatus()
    {
        return oldStatus;
    }

    public void setOldStatus( String oldStatus )
    {
        this.oldStatus = oldStatus;
    }

    public String getFinalStatus()
    {
        return finalStatus;
    }

    public void setFinalStatus( String finalStatus )
    {
        this.finalStatus = finalStatus;
    }

    public int getSalesOrderId()
    {
        return salesOrderId;
    }

    public void setSalesOrderId( int salesOrderId )
    {
        this.salesOrderId = salesOrderId;
    }

    public int getLineItemNo()
    {
        return lineItemNo;
    }

    public void setLineItemNo( int lineItemNo )
    {
        this.lineItemNo = lineItemNo;
    }

    public int getPoLineItemNo()
    {
        return poLineItemNo;
    }

    public void setPoLineItemNo( int poLineItemNo )
    {
        this.poLineItemNo = poLineItemNo;
    }

    public float getUnitPrice()
    {
        return unitPrice;
    }

    public void setUnitPrice( float unitPrice )
    {
        this.unitPrice = unitPrice;
    }

    public double getUnitPriceAsDouble()
    {
        return unitPriceAsDouble;
    }

    public void setUnitPriceAsDouble( double unitPriceAsDouble )
    {
        this.unitPriceAsDouble = unitPriceAsDouble;
    }

    public double getAmountAsDouble()
    {
        return amountAsDouble;
    }

    public void setAmountAsDouble( double amountAsDouble )
    {
        this.amountAsDouble = amountAsDouble;
    }

    public String getDisplayUnitPrice()
    {
        return StringUtils.formatAmountWithNoOfDecimals( unitPriceAsDouble );

    }

    public void setDisplayUnitPrice( String displayUnitPrice )
    {
        this.displayUnitPrice = displayUnitPrice;
    }

    public String getRequestDate()
    {
        return requestDate;
    }

    public void setRequestDate( String requestDate )
    {
        this.requestDate = requestDate;
    }

    public String getBookingDate()
    {
        return bookingDate;
    }

    public void setBookingDate( String bookingDate )
    {
        this.bookingDate = bookingDate;
    }

    public String getSuggScheduleDate()
    {
        return suggScheduleDate;
    }

    public void setSuggScheduleDate( String suggScheduleDate )
    {
        this.suggScheduleDate = suggScheduleDate;
    }


    public String getSuggScheduleDateWithSubstitutables()
    {
        return suggScheduleDateWithSubstitutables;
    }

    public void setSuggScheduleDateWithSubstitutables( String suggScheduleDateWithSubstitutables )
    {
        this.suggScheduleDateWithSubstitutables = suggScheduleDateWithSubstitutables;
    }

    public String getSuggScheduleDateWithoutSubstitutables()
    {
        return suggScheduleDateWithoutSubstitutables;
    }

    public void setSuggScheduleDateWithoutSubstitutables( String suggScheduleDateWithoutSubstitutables )
    {
        this.suggScheduleDateWithoutSubstitutables = suggScheduleDateWithoutSubstitutables;
    }

    public String getScheduleDate()
    {
        if( scheduleDate == null )
            scheduleDate = "";
        return scheduleDate;
    }

    public void setScheduleDate( String scheduleDate )
    {
        this.scheduleDate = scheduleDate;
    }

    public String getRevisedDate()
    {
        if( revisedDate == null )
            revisedDate = "";

        return revisedDate;
    }

    public void setRevisedDate( String revisedDate )
    {
        this.revisedDate = revisedDate;
    }

    public String getShippedDate()
    {
        return shippedDate;
    }

    public void setShippedDate( String shippedDate )
    {
        this.shippedDate = shippedDate;
    }

    public int getChangeNumber()
    {
        return changeNumber;
    }

    public void setChangeNumber( int changeNumber )
    {
        this.changeNumber = changeNumber;
    }

    public String getReason()
    {
        return reason;
    }

    public void setReason( String reason )
    {
        this.reason = reason;
    }

    public String getAddedById()
    {
        return addedById;
    }

    public void setAddedById( String addedById )
    {
        this.addedById = addedById;
    }

    public String getAddedByName()
    {
        return addedByName;
    }

    public void setAddedByName( String addedByName )
    {
        this.addedByName = addedByName;
    }

    public boolean isCancel()
    {
        return isCancel;
    }

    public void setIsCancel( boolean isCancel )
    {
        this.isCancel = isCancel;
    }

    public boolean getIsCancel()
    {
        return isCancel;
    }

    public void setCancelStatus( boolean cancelStatus )
    {
        this.cancelStatus = cancelStatus;
    }


    public boolean getCancelStatus()
    {
        return cancelStatus;
    }

    public boolean isHold()
    {
        return isHold;
    }

    public void setIsHold( boolean isHold )
    {
        this.isHold = isHold;
    }

    public String getCustomerPO()
    {
        return customerPO;
    }

    public void setCustomerPO( String customerPO )
    {
        this.customerPO = customerPO;
    }

    public String getCustomerName()
    {
        return customerName;
    }

    public void setCustomerName( String customerName )
    {
        this.customerName = customerName;
    }

    public boolean getIsEditable()
    {
        return isEditable;
    }

    public void setIsEditable( boolean isEditable )
    {
        this.isEditable = isEditable;
    }

    public String getIsTaxableAsString()
    {
        return ( isTaxable ? "Yes" : "No" );
    }

    public boolean getIsTaxable()
    {
        return isTaxable;
    }

    public void setIsTaxable( boolean isTaxable )
    {
        this.isTaxable = isTaxable;
    }

    public boolean getZeroPrice()
    {
        return zeroPrice;
    }

    public void setZeroPrice( boolean zeroPrice )
    {

        this.zeroPrice = zeroPrice;
    }

    public HashMap getReservedLotQtyByWeekMap()
    {
        return m_reservedLotQtyByWeekMap;
    }

    public void setReservedLotQtyByWeekMap( HashMap reservedLotQtyByWeekMap )
    {
        m_reservedLotQtyByWeekMap = reservedLotQtyByWeekMap;
    }

    public ArrayList getLotReservationList()
    {
        return m_lotReservationList;
    }

    public void setLotReservationList( ArrayList lotReservationList )
    {
        m_lotReservationList = lotReservationList;
    }

    public Iterator getRemarks()
    {
        return m_remarks.iterator();
    }

    public void setRemarks( String remarks )
    {
        m_remarks.add( remarks );
    }

    public String getMarketingHold()
    {
        return mktgHold;
    }

    public void setMarketingHold( String mktgHold )
    {
        this.mktgHold = mktgHold;
    }

    public String getFinanceHold()
    {
        return financeHold;
    }

    public void setFinanceHold( String financeHold )
    {
        this.financeHold = financeHold;
    }

    public String getSalesHold()
    {
        return salesHold;
    }

    public void setSalesHold( String salesHold )
    {
        this.salesHold = salesHold;
    }

    public String getOperationsHold()
    {
        return operationsHold;
    }

    public void setOperationsHold( String operationsHold )
    {
        this.operationsHold = operationsHold;
    }

    public String getSalesOrderNo()
    {
        return salesOrderNo;
    }

    public void setSalesOrderNo( String salesOrderNo )
    {
        this.salesOrderNo = salesOrderNo;
    }

    int shippedQty = 0;

    public int getShippedQty()
    {
        return shippedQty;
    }

    public void setShippedQty( int shippedQty )
    {
        this.shippedQty = shippedQty;
    }

    public String getShippedQtyAsString()
    {
        return StringUtils.formatUnits( shippedQty );
    }

    public int getToBeShippedQty()
    {
        if( this.shippedQty == 0 )
        {
            this.shippedQty = SalesOrderDAO.getLineItemShippedQty( lineItemId );
        }

        return ( this.quantity - this.shippedQty );
    }
    public String getToBeShippedQtyAsString()
    {
        if( this.shippedQty == 0 )
        {
            this.shippedQty = SalesOrderDAO.getLineItemShippedQty( lineItemId );
        }

        return StringUtils.formatUnits( this.quantity - this.shippedQty );
    }
    /*To calculate Extended Price for quantity to be Shipped */
    public float getExtendedPrice()
    {
        int shippedQuantity = getToBeShippedQty();
        float price = getUnitPrice();
        return ( shippedQuantity * price );
    }
    public double getExtendedPriceAsDouble()
    {
        int shippedQuantity = getToBeShippedQty();
        double price = getUnitPriceAsDouble();
        extendedPriceAsDouble = shippedQuantity * price;
        return extendedPriceAsDouble;
    }
    public String getExtendedPriceAsString()
    {
        int shippedQuantity = getToBeShippedQty();
        return StringUtils.formatAmountWithNoOfDecimals( shippedQuantity * getUnitPriceAsDouble() );
    }
    public String getDescription()
    {
        return description;
    }
    public void setDescription( String description )
    {
        this.description = description;
    }
    public int getInventorySize()
    {
        return m_InventorySize;
    }
    public void setInventorySize( int inventorySize )
    {
        m_InventorySize = inventorySize;
    }
    public String getScheduleNumber()
    {
        return m_scheduleNumber;
    }
    public void setScheduleNumber( String scheduleNumber )
    {
        m_scheduleNumber = scheduleNumber;
    }
    public String getCustomerPartNumber()
    {
        return m_customerPartNumber;
    }
    public void setCustomerPartNumber( String customerPartNumber )
    {
        m_customerPartNumber = customerPartNumber;
    }
    public boolean isSplit()
    {
        return isSplit;
    }
    public void setSplit( boolean split )
    {
        isSplit = split;
    }
    public int getSplitQty()
    {
        return splitQty;
    }
    public void setSplitQty( int splitQty )
    {
        this.splitQty = splitQty;
    }

    public boolean getIsTransfer()
    {
        return isTransfer;
    }

    public void setIsTransfer( boolean isTransfer )
    {
        this.isTransfer = isTransfer;
    }

    public boolean getIsClose()
    {
        return isClose;
    }

    public void setIsClose( boolean isClose )
    {
        this.isClose = isClose;
    }

    public double getExtendedPriceForQuote()
    {
        double extendedPrice = getUnitPriceAsDouble() * getQuantity();
        return extendedPrice;
    }

    public String getExtendedPriceForQuoteAsString()
    {
        double extendedPrice = getUnitPriceAsDouble() * getQuantity();
        return StringUtils.formatAmountWithNoOfDecimals( extendedPrice );
    }

    public String getCustomerPartNo()
    {

        if( customerPartNo == null )
        {
            customerPartNo = "";
        }
        return customerPartNo;
    }

    public void setCustomerPartNo( String customerPartNo )
    {
        this.customerPartNo = customerPartNo;
    }

    public boolean getIsApproved()
    {
        return isApproved;
    }

    public void setIsApproved( boolean isApproved )
    {
        this.isApproved = isApproved;
    }

    public int getPreviousQuantity()
    {
        return previousQuantity;
    }

    public void setPreviousQuantity( int previousQuantity )
    {
        this.previousQuantity = previousQuantity;
    }

    public boolean getIsExpedite()
    {
        return isExpedite;
    }

    public void setIsExpedite( boolean isExpedite )
    {
        this.isExpedite = isExpedite;
    }

    public boolean getIsNewLineItem()
    {
        return isNewLineItem;
    }

    public void setIsNewLineItem( boolean isNewLineItem )
    {
        this.isNewLineItem = isNewLineItem;
    }

    public String getEndUser()
    {
        if(  endUser != null && "null".equals( endUser.trim() ))
        {
             endUser = "";
        }
        return endUser;
    }

    public void setEndUser( String endUser )
    {
        this.endUser = endUser;
    }

    public String getEndCustomer()
    {
        if(  endCustomer != null && "null".equals( endCustomer.trim() ))
        {
             endCustomer = "";
        }
        return endCustomer;
    }

    public void setEndCustomer(String endCustomer) {
        this.endCustomer = endCustomer;
    }

    public int getNewLineItemNumber()
    {
        return newLineItemNumber;
    }

    public void setNewLineItemNumber( int newLineItemNumber )
    {
        this.newLineItemNumber = newLineItemNumber;
    }

    public boolean isType()
    {
        return type;
    }

    public void setType( boolean type )
    {
        this.type = type;
    }

    public String getCategory() {
            return category;
    }

    public void setCategory(String category) {
        this.category = category;
    }

    public String getStartMacAddress() {
        return startMacAddress;
    }

    public void setStartMacAddress(String startMacAddress) {
        this.startMacAddress = startMacAddress;
    }

    public String getEndMacAddress() {
        return endMacAddress;
    }

    public void setEndMacAddress(String endMacAddress) {
        this.endMacAddress = endMacAddress;
    }

    public boolean getIsGenerated() {
            return isGenerated;
    }

    public void setIsGenerated(boolean generated) {
        isGenerated = generated;
    }

    public String getLabelNumber() {
        return labelNumber;
    }

    public void setLabelNumber(String labelNumber) {
        this.labelNumber = labelNumber;
    }

    public int getQuotedQuantity()
    {
        return quotedQuantity;
    }

    public void setQuotedQuantity( int quotedQuantity )
    {
        this.quotedQuantity = quotedQuantity;
    }

    public String getQuotedDate()
    {
        return quotedDate;
    }

    public void setQuotedDate( String quotedDate )
    {
        this.quotedDate = quotedDate;
    }

    public String getOdmPartNo()
    {

        if( odmPartNo == null )
        {
            odmPartNo = "";
        }
        return odmPartNo;
    }

    public void setOdmPartNo( String odmPartNo )
    {
        this.odmPartNo = odmPartNo;
    }

    /**
     * This method truncates the data which is more the max lenght allowed
     * in GP for that column
     */
    public void prepareLineItemForGPInsertion()
    {
        if( this.getSalesOrderNo() == null )
        {
            this.setSalesOrderNo( "" );
        }
        else if( this.getSalesOrderNo().length() > 31 )
        {
            this.setSalesOrderNo( this.getSalesOrderNo().substring( 0, 30 ) );
        }

        if( this.getManufacturingPartNo() == null )
        {
            this.setManufacturingPartNo( "" );
        }
        else if( this.getManufacturingPartNo().length() > 31 )
        {
            this.setManufacturingPartNo( this.getManufacturingPartNo().substring( 0, 30 ) );
        }

        if( this.getDescription() == null )
        {
            this.setDescription( "" );
        }
        else if( this.getDescription().length() > 51 )
        {
            this.setDescription( this.getDescription().substring( 0, 50 ) );
        }
    }

    public String toString()
    {
        StringBuffer sb = new StringBuffer();
        sb.append( "LI#=" + lineItemNo + "; MktgPart=" + marketingPartNo + "; MfgPart = " + manufacturingPartNo );
        sb.append( "; Qty=" + quantity + "; UnitPrice=" + unitPrice + "; ReqDD = " + requestDate + "; ShipDate=" + shippedDate + "/n" );
        return sb.toString();
    }

	public String getEccn()
	{
		return eccn;
	}

	public String getLicenseException()
	{
		return licenseException;
	}

	public String getUom()
	{
		return uom;
	}

	public void setEccn(String string)
	{
		eccn = string;
	}

	public void setLicenseException(String string)
	{
		licenseException = string;
	}

	public void setUom(String string)
	{
		uom = string;
	}

    public String getErrorMessage()
    {
        return errorMessage;
    }

    public void setErrorMessage(String errorMessage)
    {
        this.errorMessage = errorMessage;
    }

    public int getCustomerId()
    {
        return customerId;
    }

    public void setCustomerId(int customerId) {
        this.customerId = customerId;
    }

    public int getOdmId() {
        return odmId;
    }

    public void setOdmId(int odmId) {
        this.odmId = odmId;
    }

    public int getShipmentNo() {
        return shipmentNo;
    }

    public void setShipmentNo(int shipmentNo) {
        this.shipmentNo = shipmentNo;
    }

    public String getCrc() {
        return crc;
    }

    public void setCrc(String crc) {
        this.crc = crc;
    }

    public String getProgAlgorithm() {
        return progAlgorithm;
    }

    public void setProgAlgorithm(String progAlgorithm) {
        this.progAlgorithm = progAlgorithm;
    }

    public String getLastUpdateDate() {
        return lastUpdateDate;
    }

    public void setLastUpdateDate(String lastUpdateDate) {
        this.lastUpdateDate = lastUpdateDate;
    }

    public String getOrderType() {
        return orderType;
    }

    public void setOrderType(String orderType) {
        this.orderType = orderType;
    }

    public int getQuotationLineItemId() {
        return quotationLineItemId;
    }

    public void setQuotationLineItemId(int quotationLineItemId) {
        this.quotationLineItemId = quotationLineItemId;
    }

    public int getSalesOrderLineItemId() {
        return salesOrderLineItemId;
    }

    public void setSalesOrderLineItemId(int salesOrderLineItemId) {
        this.salesOrderLineItemId = salesOrderLineItemId;
    }

    public String getSalesOrderLineItemNo() {
        return salesOrderLineItemNo;
    }

    public void setSalesOrderLineItemNo(String salesOrderLineItemNo) {
        this.salesOrderLineItemNo = salesOrderLineItemNo;
    }

    public String getQuotationLineItemNo() {
        return quotationLineItemNo;
    }

    public void setQuotationLineItemNo(String quotationLineItemNo) {
        this.quotationLineItemNo = quotationLineItemNo;
    }

    public String getScheduleDescription() {
        return scheduleDescription;
    }

    public void setScheduleDescription(String scheduleDescription) {
        this.scheduleDescription = scheduleDescription;
    }

    public int getProcessStep_Id() {
        return processStep_Id;
    }

    public void setProcessStep_Id(int processStep_Id) {
        this.processStep_Id = processStep_Id;
    }

    public String getFabCountryOfOrigin() {
        return fabCountryOfOrigin;
    }

    public void setFabCountryOfOrigin(String fabCountryOfOrigin) {
       this.fabCountryOfOrigin = fabCountryOfOrigin;
    }

    public String getAssyCountryOfOrigin() {
       return assyCountryOfOrigin;
    }

    public void setAssyCountryOfOrigin(String assyCountryOfOrigin)
    {
       this.assyCountryOfOrigin = assyCountryOfOrigin;
    }


    public String getLeadTime()
    {
        return leadTime;
    }

    public void setLeadTime(String leadTime)
    {
        this.leadTime = leadTime;
    }


    public ArrayList getLeadTimeList() {
        ArrayList leadTimeList = new ArrayList();
        leadTimeList.add( new org.apache.struts.util.LabelValueBean( "In Stock", "In Stock" ) );
        leadTimeList.add( new org.apache.struts.util.LabelValueBean( "3-4 Weeks", "3-4 Weeks" ) );
        leadTimeList.add( new org.apache.struts.util.LabelValueBean( "4-6 Weeks", "4-6 Weeks" ) );
        leadTimeList.add( new org.apache.struts.util.LabelValueBean( "8-10 Weeks", "8-10 Weeks" ) );
        leadTimeList.add( new org.apache.struts.util.LabelValueBean( "11-14 Weeks", "11-14 Weeks" ) );
        leadTimeList.add( new org.apache.struts.util.LabelValueBean( "> 14 Weeks", "> 14 Weeks" ) );
        return leadTimeList;
    }

    public void setLeadTimeList(ArrayList leadTimeList)
    {

    }

    public int getSplitFromLineItemId()
    {
        return splitFromLineItemId;
    }

    public void setSplitFromLineItemId(int splitFromLineItemId)
    {
        this.splitFromLineItemId = splitFromLineItemId;
    }

    public int getQtyAfterSplit()
    {
        return qtyAfterSplit;
    }

    public void setQtyAfterSplit(int qtyAfterSplit)
    {
        this.qtyAfterSplit = qtyAfterSplit;
    }

    public double getDiscountPrice() {
        return discountPrice;
    }

    public void setDiscountPrice(double discountPrice) {
        this.discountPrice = discountPrice;
    }

    public String getDiscountPriceAsString()
    {
        return StringUtils.formatAmountWithNoOfDecimals( discountPrice );
    }

    public double getDiscountAmount() {
        return discountAmount;
    }

    public void setDiscountAmount(double discountAmount) {
        this.discountAmount = discountAmount;
    }

    public String getDiscountAmountAsString()
    {
        return StringUtils.formatAmountWithNoOfDecimals( discountAmount );
    }

    public boolean getIsCreditNote()
    {
        return isCreditNote;
    }

    public void setIsCreditNote(boolean isCreditNote)
    {
        this.isCreditNote = isCreditNote;
    }

    public int getAdjustmentQty() {
        return adjustmentQty;
    }

    public void setAdjustmentQty(int adjustmentQty) {
        this.adjustmentQty = adjustmentQty;
    }
    public String getAdjustmentQtyAsString()
    {
        return StringUtils.formatUnits( adjustmentQty );
    }

    public double getReqPrice() {
        return reqPrice;
    }

    public void setReqPrice(double reqPrice) {
        this.reqPrice = reqPrice;
    }

    public double getCustResalePrice() {
        return custResalePrice;
    }

    public void setCustResalePrice(double custResalePrice) {
        this.custResalePrice = custResalePrice;
    }

    public double getSuggResalePrice() {
        return suggResalePrice;
    }

    public void setSuggResalePrice(double suggResalePrice) {
        this.suggResalePrice = suggResalePrice;
    }

    public String getReqPriceAsString()
    {
        return StringUtils.formatAmountWithNoOfDecimals( reqPrice );
    }
    public String getCustResaleAsString()
    {
        return StringUtils.formatAmountWithNoOfDecimals( custResalePrice);
    }
    public String getSuggResaleAsString()
    {
        return StringUtils.formatAmountWithNoOfDecimals( suggResalePrice);
    }

    public String getNewCustomerPartNo() {
        return newCustomerPartNo;
    }

    public void setNewCustomerPartNo(String newCustomerPartNo) {
        this.newCustomerPartNo = newCustomerPartNo;
    }

    public String getShippingTerms() {
        return shippingTerms;
    }

    public void setShippingTerms(String shippingTerms) {
        this.shippingTerms = shippingTerms;
    }


    public boolean isLineItemDetailsModified() {
        return lineItemDetailsModified;
    }

    public void setLineItemDetailsModified(boolean lineItemDetailsModified) {
        this.lineItemDetailsModified = lineItemDetailsModified;
    }


    public boolean isLineItemIntialCancellation() {
        return lineItemIntialCancellation;
    }

    public void setLineItemIntialCancellation(boolean lineItemIntialCancellation) {
        this.lineItemIntialCancellation = lineItemIntialCancellation;
    }


    public boolean isLineItemSplited() {
        return lineItemSplited;
    }

    public void setLineItemSplited(boolean lineItemSplited) {
        this.lineItemSplited = lineItemSplited;
    }

    public String getShipFromVendor() {
        return shipFromVendor;
    }

    public void setShipFromVendor(String shipFromVendor) {
        this.shipFromVendor = shipFromVendor;
    }

    public int getPortingStatusCode() {
        return portingStatusCode;
    }

    public void setPortingStatusCode(int portingStatusCode) {
        this.portingStatusCode = portingStatusCode;
    }

    public int getMinOrderQty() {
        return minOrderQty;
    }

    public void setMinOrderQty(int minOrderQty) {
        this.minOrderQty = minOrderQty;
    }

    public double getCustomPriceField1() {
        return customPriceField1;
    }

    public void setCustomPriceField1(double customPriceField1) {
        this.customPriceField1 = customPriceField1;
    }

    public String getCustomTextField1() {
        return customTextField1;
    }

    public void setCustomTextField1(String customTextField1) {
        this.customTextField1 = customTextField1;
    }
    public String getCustomPriceField1AsString() {
        return StringUtils.formatAmountWithNoOfDecimals( customPriceField1 );
    }
}